package com.doophan.dac.client.controller;

import com.doophan.dac.client.domain.TreeNode;
import com.doophan.dac.client.service.FileService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/file")
public class FileController {
    @Resource
    private FileService fileService;

    @GetMapping("/getChildren/{path}")
    public List<TreeNode> getChildren(@PathVariable String path) throws Exception {
        return fileService.getChildren(path);
    }
}
